#include <iostream>
using namespace std;
void insertSort(int d[], int do_length, int a) {
//	d[do_length]=a; //in case: a is the smallest
	for (int i = do_length - 1; i >= 0; i--) {
		if (d[i] < a) {
			d[i + 1] = d[i];
			d[i] = a;
		} else {
			d[i + 1] = a;
			break;
		}
	}
}
void output(int d[], int n) {
	for (int i = 0; i < n; i++) {
		cout << d[i] << endl;
	}
	cout << endl;
}
void sort(int d[], int ip[], int n) {
	d[0] = ip[0];
	for (int i = 1; i < n; i++) {
		insertSort(d, i, ip[i]);
//		output(d);

	}
}

int main() {
	int n;
	cin >> n;
	int ip[n], d[n];
	for (int i = 0; i < n; i++) {
		cin >> ip[i];
	}
	sort(d, ip, n);
	output(d, n);
	return 0;
}
